package top.mcwebsite.playandroid.lib.common.ext

import android.os.Build
import java.net.URLEncoder

fun String.encodeURL(): String =
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
        URLEncoder.encode(this, Charsets.UTF_8)
    } else {
        URLEncoder.encode(this)
    }

